/*
 * @Author: Maple
 * @Date: 2021-03-22 09:50:07
 * @LastEditors  : Shiming
 * @LastEditTime : 2022-01-20 16:54:57
 * @Description:全局环境服务
 */
import { Injectable } from '@angular/core';

@Injectable({
  providedIn: 'root',
})
export class EnvironmentService {
  // 运多星运营管理后台应用ID
  private appId = `5800BF51DC9A494489700F09E3B81520`;
  // 运多星货主后台应用ID
  private HzappId = `A48F72F0A304427F921794BAD86B3522`;
  // 运多星司机应用ID
  private sjappId = `AB5EDFE8A46D46EBA69F2CBB6C94D226`;
  // 租户ID
  private tenantId = `1352892699355607041`;
  private env: { appId: string; tenantId: string } = { appId: this.appId, tenantId: this.tenantId };
  constructor() {
    this.setEnvironment(this.appId, this.tenantId);
  }
  /**
   * 设置环境信息
   * @param appId 应用ID
   * @param tenantId 租户ID
   */
  setEnvironment(appId: string, tenantId: string): void {
    this.env = { appId, tenantId };
  }

  /**
   * 获取环境信息
   * @returns 环境信息
   */
  getEnvironment() {
    return this.env;
  }
}
